#pragma once
class CJRtpSendVideo;

typedef enum
{
	emJPEG,//JPEG
	em3GP,//3gp
	enMPEG4,//mpeg4
}SAVE_FORMAT;

EXTERN_GUID(CLSID_ArcMpeg4EncoderDMO, 
0xe3116eb9, 0x2128, 0x4bee, 0xb2, 0x67, 0x41, 0xb9, 0xe4, 0x4d, 0x11, 0x50);

EXTERN_GUID(CLSID_ArcH263EncoderDMO, 
0x4d5e7d60, 0x6e59, 0x4dba, 0xba, 0x37, 0x14, 0x7, 0xc3, 0x75, 0xb8, 0xe7);


class CVideoSendHelper
{
public:
	CVideoSendHelper(void);
	~CVideoSendHelper(void);
private:
	CComPtr<ICaptureGraphBuilder2> m_pCaptureGraphBuilder;
	CComPtr<IGraphBuilder> m_pGraph;
	CComPtr<IMediaControl> m_pControl;

	CComPtr<IBaseFilter>   m_pVideoCaptureFilter;
	CComPtr<IBaseFilter>   m_pNullRenderer;
	CJRtpSendVideo*        m_pRtpSender;
	CComPtr<IBaseFilter>   m_pISender;

	CComPtr<IBaseFilter>   pVideoEncoder;
	
	void setVideoEncodec(SAVE_FORMAT format);
	void getVideoCaptureSource();

public:
	int init(void);
	HWND window_id;
	IPin * GetPin(IBaseFilter *pFilter, PIN_DIRECTION PinDir);
	int RunVideoRecGraph(RtpSession* session,RtpProfile *profile, int payload);
};
